#pragma once

#include "../../plugin/base/framework.hh"
#include "../../corelib/singleton.hpp"
#include <vector>

class Dummy;
class MyComponentBase;

// User implemented framework
// @see Framework
class ExampleFramework : public Framework {
    using DummyVector = std::vector<Dummy*>;
    DummyVector dummyVector_;
    std::shared_ptr<MyComponentBase> componentRef_;
    PathID pathID_;
    kratos::grid::SiteID siteID_;

public:
    virtual bool onInstall(kconfig::Config* config);
    virtual bool onUninstall();
    virtual bool onStart(kconfig::Config* config) override;
    virtual bool onStop() override;
    virtual void onPathJoin(PathID pathID, SiteType siteType, UserData userData) override;
    virtual void onSiteJoin(const kratos::grid::SiteID& siteID) override;

    void vanishComponent();

private:
    void RPCTest();
};

// singleton of user framework
// NOTICE the name 'FrameworkRef' MUST NOT change
#define FrameworkRef (*kratos::corelib::Singleton<ExampleFramework>::instance())
